const CopyWebpackPlugin = require('copy-webpack-plugin')
const webpack = require('webpack')
module.exports = {
    // 基本路径  3.6之前的版本时 baseUrl
    publicPath: "./",
    // 输出文件目录
    outputDir: "dist",
    // eslint-loader 是否在保存的时候检查
    lintOnSave: false,
    configureWebpack: {
        plugins: [
            new CopyWebpackPlugin({
                patterns: [
                    { from: "node_modules/cesium/Build/Cesium/Workers", to: "Workers" },
                    { from: "node_modules/cesium/Build/Cesium/ThirdParty", to: "ThirdParty" },
                    { from: "node_modules/cesium/Build/Cesium/Assets", to: "Assets" },
                    { from: "node_modules/cesium/Build/Cesium/Widgets", to: "Widgets" }
                ]
            }),
            new webpack.DefinePlugin({
                CESIUM_BASE_URL: JSON.stringify("")
            })
        ],
        module: {
            unknownContextCritical: /^.\/.*$/,
            unknownContextCritical: false
        }
    }
}
